import time

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    # for browser_type in [p.chromium, p.firefox, p.webkit]:
    for browser_type in [p.chromium]:
        browser = browser_type.launch(headless=False)
        page = browser.new_page()
        page.goto("https://auth.smartedu.cn/uias/login")
        page.get_by_placeholder("请输入通行证ID/手机号/学生号").fill("13765069352")
        page.get_by_placeholder("请输入密码").fill("13765069352")
        page.locator("#agreementCheckbox").click()
        page.get_by_role("button", name="登录").click()


        # page.pause()
        time.sleep(5)
        page.close()
        browser.close()